package com.sweet.logging.logger;

/**
 * 写日志事件对象，最终将交付给专门的 {@code com.sweet.logging.appender.Appender 处理}
 *
 * @author xiexiaofeng
 * @version 1.0     2017年09月08日  11点52分
 */
public class LoggingEvent
{
    private long         timeStamp;
    private LoggingLevel level;
    private String       message;
    private String       name;
    private Throwable    throwable;

    LoggingEvent(String name, LoggingLevel level, String message, Throwable throwable)
    {
        this.timeStamp = System.currentTimeMillis();
        this.level     = level;
        this.name      = name;
        this.message   = message;
        this.throwable = throwable;
    }


    public long getTimeStamp()
    {
        return timeStamp;
    }

    public void setTimeStamp(long timeStamp)
    {
        this.timeStamp = timeStamp;
    }

    public LoggingLevel getLevel()
    {
        return level;
    }

    public void setLevel(LoggingLevel level)
    {
        this.level = level;
    }

    public String getMessage()
    {
        return message;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public Throwable getThrowable()
    {
        return throwable;
    }

    public void setThrowable(Throwable throwable)
    {
        this.throwable = throwable;
    }

}
